import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/dashboard'
  },
  {
    path: '/dashboard',
    name: 'Dashboard',
    component: () => import('../views/Dashboard.vue')
  },
  {
    path: '/applets',
    name: 'Applets',
    component: () => import('../views/Applets.vue')
  },
  {
    path: '/customization',
    name: 'Customization',
    component: () => import('../views/Customization.vue')
  },
  {
    path: '/case',
    name: 'Case',
    component: () => import('../views/Case.vue')
  },
  {
    path: '/news',
    name: 'News',
    component: () => import('../views/News.vue')
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue')
  },
  {
    path: '/newsdetail',
    name: 'newsdetail',
    component: () => import('../views/NewsDetail.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
